package stz.flash.option.flashlight;

import stz.flash.option.PersistentData;

public class LEDOption {
	
	private static final LEDOption instance = new LEDOption();
	
	private static boolean latestLEDState;
	
	private PersistentData data = PersistentData.getPersistentDatabase();
	
	private LEDOption() {
	}
	
	public static LEDOption getIns(){
		return instance;
	}

	public boolean isStartupLedState() {
		return data.isStartupLedState();
	}
	public void setStartupLedState(boolean ledState) {
		data.setStartupLedState(ledState);
	}
	
	public static boolean isLatestLEDState() {
		return latestLEDState;
	}
	public static void setLatestLEDState(boolean latestLEDState) {
		LEDOption.latestLEDState = latestLEDState;
	}
	
	public void updateLatestLedStateWithStartupSet(){
		latestLEDState = isStartupLedState();
	}
}